package com.example.aop;

import com.example.aop.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName:testXML
 * Package:com.example.aop
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/11-9:07
 * @Version:v1.0
 */
public class testXML {
    @Test
    public void testXML() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-aop.xml");
        UserService userService = applicationContext.getBean("userService", UserService.class);
        userService.logout();
    }
}
